<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<MvcCms.Web.ViewModels.SiteMapModel>" ContentType="text/xml" %>
<%
    //pull the cats from a view so they all come out
    string baseUrl = Model._BaseUrl;
    if (!baseUrl.EndsWith("/"))
        baseUrl += "/";
    if (!baseUrl.StartsWith("http"))
        baseUrl = "http://" + baseUrl;
    Session["baseUrl"] = baseUrl;
%><?xml version="1.0" encoding="utf-8" ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    <url>
        <loc><%=Html.Encode(baseUrl)%></loc> 
        <changefreq>weekly</changefreq> 
        <priority>0.90</priority> 
    </url>
    <% Html.RenderPartial("ControlsSiteMap/SiteMapControl", Model._Categories); %>  
</urlset>
